home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1984 May / 1984-05.d64 / mind boggle_64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  119 lines

  1. 100 dimc(4),g(4):poke53281,15
  2. 101 so = 54272:for t=so to so+24:poket,0:next:x=0
  3. 102 pokeso+24,15:pokeso+5,17:pokeso+6,241
  4. 300 print"[147][144]mind boggle":fort=1to 1000:next
  5. 340 print"[147]"
  6. 350 print "[144]   1 [146]   2 [146]   3 [146]   4 [146] [156]  5 [146]   6 [146][144]"
  7. 365 printspc(6)"[144]i am choosing 4 colors now[144]":forl=1to100
  8. 366 pokes2,int(rnd(1)*128)+128:for m=1 to 10:nextm:nextl:pokes2,0:gosub4050
  9. 400 a$="123456":r=int(rnd(1)*6)+1:a1$=mid$(a$,r,1):a1=val(a1$)
  10. 401 r=int(rnd(1)*6)+1:a2$=mid$(a$,r,1):ifa1$=a2$then401
  11. 402 a2=val(a2$)
  12. 403 r=int(rnd(1)*6)+1:a3$=mid$(a$,r,1):ifa1$=a3$ora2$=a3$then403
  13. 404 a3=val(a3$)
  14. 405 r=int(rnd(1)*6)+1:a4$=mid$(a$,r,1):ifa1$=a4$ora2$=a4$ora3$=a4$then405
  15. 406 a4=val(a4$)
  16. 500 for t= 1to 1000:next
  17. 510 pokeso,100:pokeso+1,100:pokeso+4,17:forl=1to100:nextl:pokeso+4,16
  18. 540 poke214,21:poke211,5:print:print"                                  "
  19. 550 x$="":poke214,21:poke211,0:print:input "select colors";x$
  20. 600 iflen(x$)<>4thengosub4050:goto3300
  21. 700 fore=1to4:v=val(mid$(x$,e,1))
  22. 705 ifv<1orv>6thengosub4050:goto3300
  23. 710 nexte
  24. 900 x=x+1:b=0:w=0:aa$=a1$+a2$+a3$+a4$
  25. 901 forj=1to4
  26. 902 g(j)=val(mid$(x$,j,1))
  27. 903 c(j)=val(mid$(aa$,j,1))
  28. 904 ifg(j)=c(j)thenb=b+1:g(j)=0:c(j)=0
  29. 905 nextj
  30. 906 forj=1to4:ifc(j)=0then912
  31. 907 h=0:fork=1to4
  32. 908 ifc(j)=0then911
  33. 909 ifc(j)<>g(k)then911
  34. 910 h=1:g(k)=0:c(j)=0
  35. 911 nextk:w=w+h
  36. 912 nextj
  37. 1000 onxgoto1100,1105,1110,1115,1120,1125,1130,1135,1140,1145
  38. 1100 print" 1 ";:goto1200
  39. 1105 print" 2 ";:goto1200
  40. 1110 print" 3 ";:goto1200
  41. 1115 print" 4 ";:goto1200
  42. 1120 print" 5 ";:goto1200
  43. 1125 print" 6 ";:goto1200
  44. 1130 print" 7 ";:goto1200
  45. 1135 print" 8 ";:goto1200
  46. 1140 print" 9 ";:goto1200
  47. 1145 print"10 ";
  48. 1200 x1=val(left$(x$,1)):x2=val(mid$(x$,2,1)):x3=val(mid$(x$,3,1))
  49. 1210 x4=val(right$(x$,1))
  50. 1220 p=0:t=0
  51. 1300 p=p+1:onx1goto1700,1701,1702,1703,1704,1705
  52. 1400 p=p+1:onx2goto1700,1701,1702,1703,1704,1705
  53. 1500 p=p+1:onx3goto1700,1701,1702,1703,1704,1705
  54. 1600 p=p+1:onx4goto1700,1701,1702,1703,1704,1705
  55. 1700 print"[144]   [146] ";:pokeso+1,100:goto1750
  56. 1701 print"   [146] ";:pokeso+1,124:goto1750
  57. 1702 print"   [146] ";:pokeso+1,140:goto1750
  58. 1703 print"   [146] ";:pokeso+1,166:goto1750
  59. 1704 print"[156]   [146] ";:pokeso+1,150:goto1750
  60. 1705 print"   [146] ";:pokeso+1,185:goto1750
  61. 1750 pokeso+4,17:forl=1to99:nextl:pokeso+4,16:forl=1to250:nextl
  62. 1751 onpgoto1400,1500,1600
  63. 1761 ontgoto2072,2073,2074,2075
  64. 1800 print" ";:ifb=0then2000
  65. 1810 gosub3100
  66. 1820 onbgoto1900,1901,1902,1903
  67. 1900 print"[144][209]";:goto2000
  68. 1901 print"[144][209][209]";:goto2000
  69. 1902 print"[144][209][209][209]";:goto2000
  70. 1903 print"[144][209][209][209][209]";:goto4000
  71. 2000 ifw=0then2060
  72. 2010 gosub3200
  73. 2020 onwgoto2050,2051,2052,2053
  74. 2050 print"[144][209][146]":goto2060
  75. 2051 print"[144][209][209][146]":goto2060
  76. 2052 print"[144][209][209][209][146]":goto2060
  77. 2053 print"[144][209][209][209][209][146]"
  78. 2060 print"[144]":print"                     "
  79. 2062 print""
  80. 2065 ifx<>10then500
  81. 2066 pokeso+4,32:forl=1to15:form=200to220+l*2:pokeso+1,m:nextm:nextl
  82. 2068 pokeso+4,32
  83. 2070 print"":print"          ";
  84. 2071 t=t+1:ona1goto1700,1701,1702,1703,1704,1705
  85. 2072 t=t+1:ona2goto1700,1701,1702,1703,1704,1705
  86. 2073 t=t+1:ona3goto1700,1701,1702,1703,1704,1705
  87. 2074 t=t+1:ona4goto1700,1701,1702,1703,1704,1705
  88. 2075 print"    ":print"[144]     correct colors  press return"
  89. 2080 ifpeek(197)<>1then2080
  90. 2085 gett$:print"[147]too bad you missed!"
  91. 2086 print"10 tries is enough."
  92. 2090 pokeso+4,33
  93. 2096 forl=1to6:pokeso+1,80:form=1to400:nextm:pokeso+4,32:form=1to400:nextm
  94. 2098 nextl:pokeso+4,32
  95. 3000 gett$:print"[147][144] want to play again?"
  96. 3005 print "yes or no?"
  97. 3010 ifpeek(197)=25thengett$:poke198,0:goto101
  98. 3012 ifpeek(197)=39then3014
  99. 3013 goto3010
  100. 3014 gett$:print"[147][144]chicken!!"  :print:print:end
  101. 3100 pokeso+4,17:forl=100to154:pokeso+1,l:nextl:pokeso+4,16:return
  102. 3200 pokeso+4,17:forl=100to48step-1:pokeso+1,l:nextl:pokeso+4,16:return
  103. 3300 print"[145]illegal input![145]":forl=1to500:nextl
  104. 3301 forl=1to999:nextl:gosub4050:goto500
  105. 4000 print:print:print"[144]you w i n !! press return"
  106. 4005 pokeso+4,33:form=180to100step-5:pokes2,m:nextm:form=100to200step 5
  107. 4006 pokeso+1,m:next m:poke so+4,32
  108. 4010 ifpeek(197)<>1then4005
  109. 4011 print"[147]";
  110. 4015 ifx=1thenprint"     lucky guess!":goto4020
  111. 4016 ifx=2orx=3thenprint"      expert!!!":goto4020
  112. 4017 ifx=4orx=5orx=6thenprint"    pretty good!":goto4020
  113. 4018 ifx=7orx=8thenprint"[156]         so so!":goto4020
  114. 4019 print"  you barely got it!"
  115. 4020 pokeso+4,33:forl=1to20:form=148to200step5:pokes2,m:nextm
  116. 4021 for m=200to 148step-5:pokeso+1,m:nextm:nextl:pokeso+4,32
  117. 4030 goto3000
  118. 4050 print"                                ":return
  119.